﻿namespace _RobotInspection.DTO
{
    public class RepairPlanDto
    {
        public RepairPlanDto()
        {

        }

        /// <summary>
        /// 点检记录ID
        /// </summary>
        public long RecordId { get; set; }

        /// <summary>
        /// 维修人员ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 维修计划名称
        /// </summary>
        public string PlanName { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 检修开始时间
        /// </summary>
        public DateTime? BeginningTime { get; set; }

        /// <summary>
        /// 检修结束时间
        /// </summary>
        public DateTime? EndingTime { get; set; }
    }

    public class RepairPlanInsertDto
    {
        public RepairPlanInsertDto()
        {

        }

        /// <summary>
        /// 关注事项ID
        /// </summary>
        public long AttentionItemId { get; set; }

        /// <summary>
        /// 维修人员ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 维修计划名称
        /// </summary>
        public string PlanName { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 检修开始时间
        /// </summary>
        public DateTime? BeginningTime { get; set; }

        /// <summary>
        /// 检修结束时间
        /// </summary>
        public DateTime? EndingTime { get; set; }
    }

    /// <summary>
    /// 分页维修计划DTO
    /// </summary>
    public class RepairPlanPagedDto
    {
        public RepairPlanPagedDto()
        {

        }

        /// <summary>
        /// 机组名称
        /// </summary>
        public string? Unit { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string? EquipmentName { get; set; }

        /// <summary>
        /// 维修人员ID
        /// </summary>
        public long? UserId { get; set; }

        /// <summary>
        /// 维修计划名称
        /// </summary>
        public string? PlanName { get; set; }

        /// <summary>
        /// 维修状态：0-检修未开始，1-待检修，2-检修完成，3-检修待跟进，4-检修逾期，5-检修取消
        /// </summary>
        public byte? Status { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 分页页码
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 分页大小
        /// </summary>
        public int PageSize { get; set; }
    }

    /// <summary>
    /// 维修计划返回结果DTO
    /// </summary>
    public class RepairPlanResultDto
    {
        public RepairPlanResultDto()
        {

        }

        /// <summary>
        /// 自增主键
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 机组名称
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string EquipmentName { get; set; }

        /// <summary>
        /// 维修人员名字
        /// </summary>
        public string RepairmanRealName { get; set; }

        /// <summary>
        /// 维修计划名称
        /// </summary>
        public string PlanName { get; set; }

        /// <summary>
        /// 维修状态：0-检修未开始，1-待检修，2-检修完成，3-检修待跟进，4-检修逾期，5-检修取消
        /// </summary>
        public byte? Status { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 检修开始时间
        /// </summary>
        public DateTime? BeginningTime { get; set; }

        /// <summary>
        /// 检修结束时间
        /// </summary>
        public DateTime? EndingTime { get; set; }

        /// <summary>
        /// 维修图片文件路径
        /// </summary>
        public string? PicturePath { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedAt { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }
    }

    /// <summary>
    /// 分页维修计划返回结果DTO
    /// </summary>
    public class RepairPlanPagedResultDto
    {
        public RepairPlanPagedResultDto()
        {

        }

        /// <summary>
        /// 返回维修计划内容
        /// </summary>
        public List<RepairPlanResultDto> RepairPlanResultList { get; set; } = [];

        /// <summary>
        /// 总记录数
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPages { get; set; }

        /// <summary>
        /// 当前页码
        /// </summary>
        public int CurrentPage { get; set; }

        /// <summary>
        /// 分页大小
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 是否有上一页
        /// </summary>
        public bool HasPreviousPage { get; set; }

        /// <summary>
        /// 是否有下一页
        /// </summary>
        public bool HasNextPage { get; set; }
    }

    /// <summary>
    /// 维修计划修改DTO
    /// </summary>
    public class RepairPlanUpdateDto
    {
        public RepairPlanUpdateDto()
        {

        }

        /// <summary>
        /// 自增主键
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 维修人员ID
        /// </summary>
        public long? UserId { get; set; }

        /// <summary>
        /// 维修计划名称
        /// </summary>
        public string? PlanName { get; set; }

        /// <summary>
        /// 维修状态：0-检修未开始，1-待检修，2-检修完成，3-检修待跟进，4-检修逾期，5-检修取消
        /// </summary>
        public byte? Status { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 维修图片文件
        /// </summary>
        public IFormFile? Picture { get; set; }
    }
}
